#ifndef ADDUSERDIALOG_H
#define ADDUSERDIALOG_H

#include <QDialog>
#include <QObject>
#include <QDate>
#include <QMessageBox>
#include "../Model/MySqlTableModel.h"

namespace Ui {
class AddUserDialog;
}

class AddUserDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddUserDialog(MySqlTableModel *model, QWidget *parent = 0);
    ~AddUserDialog();

signals:
    void addUserSuccess();

private slots:
    void on_Btn_OK_clicked();
    void on_Btn_cancel_clicked();

private:
    int getuserCount(QString);
    void clearInput();

private:
    Ui::AddUserDialog *ui;
    QString Username;
    QString Name;
    QString Passwd;
    QString Grade;
    MySqlTableModel *model;
};

#endif // ADDUSERDIALOG_H
